import request from '@/utils/request'

export const catList = (data) =>
  request({
    url: '/Cat/index',
    method: 'post',
    data
  });

  export const catTopList = (data) =>
  request({
    url: '/Cat/topCats',
    method: 'post',
    data
  });

export const catDel = (data) =>
  request({
    url: '/Cat/delCat',
    method: 'post',
    data
});

export const catInsert = (data) =>
  request({
    url: '/Cat/addCat',
    method: 'post',
    data
});

export const catInfo = (data) =>
  request({
    url: '/Cat/editCat',
    method: 'post',
    data
});

export const catOrder = (data) =>
  request({
    url: '/Cat/orderCat',
    method: 'post',
    data
});

export const newsList = (data) =>
  request({
    url: '/News/index',
    method: 'post',
    data
});

export const newsCatList = (data) =>
  request({
    url: '/News/catList',
    method: 'post',
    data
});

export const newsAdd = (data) =>
  request({
    url: '/News/newInsert',
    method: 'post',
    data
});

export const newsDel = (data) =>
  request({
    url: '/News/delteNews',
    method: 'post',
    data
});

export const newsEdit = (data) =>
  request({
    url: '/News/editNews',
    method: 'post',
    data
});